

if modifier_water_debuff == nil then modifier_water_debuff = class({}) end

function modifier_water_debuff:GetBehavior()
    return DOTA_ABILITY_BEHAVIOR_PASSIVE
end

function modifier_water_debuff:IsPurgable()
    return false
end

function modifier_water_debuff:IsHidden()
    return true
end

function modifier_water_debuff:OnCreated(keys)
    if IsServer() then
        self.color=Vector(keys.colorX,keys.colorY,keys.colorZ)
        self:StartIntervalThink(1.3)
    end
end



function modifier_water_debuff:OnIntervalThink()

    if IsServer() then
        --print("OnIntervalThink..")
        local particle = ParticleManager:CreateParticle(ParticleNames.water_debuff, PATTACH_ABSORIGIN_FOLLOW, self:GetParent())
        ParticleManager:SetParticleControl(particle, 0,self:GetParent():GetAbsOrigin())
        ParticleManager:SetParticleControl(particle, 1,self.color)
        ParticleManager:ReleaseParticleIndex(particle)
        EmitSoundOn(SoundsNames.water_debuff, self:GetParent())
        local damageTable = {
            attacker = self:GetParent(),
            victim = self:GetParent(),
            damage = 900,
            --damage=0,
            damage_type = DAMAGE_TYPE_PHYSICAL}
        ApplyDamage(damageTable)
    end
end
